﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="GestioneAgentiAcquisto.aspx.cs" Inherits="Contents_GestioneAgentiAcquisto" %>

<%@ Register Src="../Controls/myAnnuncioSqlAcq.ascx" TagName="myAnnuncioSqlAcq" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:HiddenField ID="myIdU" runat="server" />
            <ajax:TabContainer ID="tabContainer1" runat="server" ActiveTabIndex="0" Height="1500px"
                ScrollBars="Auto">
                <ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Interscambio" ScrollBars="Vertical">
                    <HeaderTemplate>
                        I tuoi agenti di acquisto / Manage your Agents
                    </HeaderTemplate>
                    <ContentTemplate>
                        <table cellspacing="6px" style="background: url(img/sfondi/barraSfumataBlu.png) repeat-x;">
                            <tr>
                                <td valign="top">
                                    Marche :<br />
                                    <asp:DropDownList ID="myMarcheDrop" runat="server" DataTextField="Marca" DataValueField="ID">
                                    </asp:DropDownList>
                                </td>
                                <td valign="top">
                                    Modello
                                    <br />
                                    <asp:DropDownList ID="myModelliDrop" runat="server" DataTextField="Modello" DataValueField="ID">
                                    </asp:DropDownList>
                                    <ajax:CascadingDropDown ID="CDD1" runat="server" TargetControlID="myModelliDrop"
                                        Category="Modelli" PromptText="Seleziona" LoadingText="[Loading...]" ServicePath=""
                                        ServiceMethod="GetDropDownModelli" ParentControlID="myMarcheDrop" SelectedValue='<%# Bind("FkModello") %>' />
                                </td>
                                <td valign="top">
                                    Possesso :<br />
                                    <asp:DropDownList ID="PossessiDrop" runat="server" DataTextField="Possesso" DataValueField="ID">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <br />
                                    <asp:CheckBox ID="AbilitatoCheckBox" runat="server" Text="Abilitato" Checked="true" />
                                </td>
                                <td valign="top">
                                    <br />
                                    <asp:ImageButton ID="ShowButton" runat="server" OnClick="ShowButton_Click" Style="width: 25px;
                                        height: 25px;" ImageUrl="~/Img/select.jpg" ToolTip="Cerca/Find" />
                                </td>
                                <td valign="top">
                                    &nbsp;
                                </td>
                                <td valign="top">
                                    <br />
                                    <asp:ImageButton ID="NewButton" runat="server" ImageUrl="~/Img/addNEW.gif" 
                                     OnClick="NewButton_Click" ToolTip="Nuovo/New" Height="25" Width="25"   />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="6">
                                    <asp:Literal ID="myLiteralMsg" runat="server"></asp:Literal>
                                </td>
                            </tr>
                        </table>
                        <asp:GridView ID="GridViewAnnunci" runat="server" DataKeyNames="ID" CellSpacing="1"
                            BackColor="White" GridLines="None" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px"
                            CellPadding="3" OnSelectedIndexChanging="GridViewAnnunci_SelectedIndexChanging"
                            OnSelectedIndexChanged="GridViewAnnunci_SelectedIndexChanged" AllowPaging="True"
                            AllowSorting="True" OnSorted="GridViewAnnunci_Sorted" OnSorting="GridViewAnnunci_Sorting">
                            <AlternatingRowStyle BorderColor="Blue" />
                            <Columns>
                                <asp:CommandField ButtonType="Image" SelectImageUrl="~/Img/select.jpg" ShowSelectButton="True" />
                            </Columns>
                            <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
                            <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                            <RowStyle BackColor="#DEDFDE" ForeColor="Black" Wrap="False" />
                            <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                    </ContentTemplate>
                </ajax:TabPanel>
                <ajax:TabPanel ID="TabPanel2" runat="server" HeaderText="Interscambio" ScrollBars="Vertical">
                    <HeaderTemplate>
                        Dati / Data
                    </HeaderTemplate>
                    <ContentTemplate>
                        <uc2:myAnnuncioSqlAcq ID="myAnnuncioSql1" runat="server" />
                    </ContentTemplate>
                </ajax:TabPanel>
            </ajax:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
        DynamicLayout="false">
        <ProgressTemplate>
            <div style="background-color: Gray;">
                In aggiornamento / Update is in progress...
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <br />

    <script type="text/javascript" language="javascript">

        //						var prm = Sys.WebForms.PageRequestManager.getInstance();
        //						prm.add_initializeRequest(initializeRequest);

        //						function initializeRequest(sender, args) {
        //								args.set_cancel(!confirm('Confermi ? '));
        //						}
    </script>

</asp:Content>
